import request from '@/utils/request'

// 试卷配置接口
export function examinationPaperList(query) {
  return request({
    url: '/manager/examinationPaper/list',
    method: 'get',
    params: query
  })
}

export function examinationPaperAdd(data) {
    return request({
      url: '/manager/examinationPaper',
      method: 'post',
      data
    })
  }
  export function examinationPaperDetail(id) {
    return request({
      url: '/manager/examinationPaper/'+id,
      method: 'get',
    })
  }
  export function examinationPaperEdit(data) {
    return request({
      url: '/manager/examinationPaper',
      method: 'put',
      data
    })
  }
  export function examinationPaperRomove(id) {
    return request({
      url: '/manager/examinationPaper/'+id,
      method: 'delete',
      
    })
  }

  // 自动匹配
  export function autoMatch(id) {
    return request({
      url: '/manager/examinationPaper/autoMatch?scaleId='+id,
      method: 'get',
    })
  }
  
// 权重配置接口
export function scaleDetail(id) {
  return request({
    url: '/manager/scale/'+id,
    method: 'get',
  })
}

export function scaleEdit(data) {
  return request({
    url: '/manager/scale',
    method: 'put',
    data
  })
}

// 试卷详细试题接口
export function paperQuestionList(query) {
  return request({
    url: '/manager/paperQuestion/list',
    method: 'get',
    params: query
  })
}

export function paperQuestionAdd(data) {
  return request({
    url: '/manager/paperQuestion',
    method: 'post',
    data
  })
}

export function paperQuestionrEditor(id) {
  return request({
    url: '/manager/paperQuestion/'+id,
    method: 'get',
  })
}

export function paperQuestionEdit(data) {
  return request({
    url: '/manager/paperQuestion',
    method: 'put',
    data
  })
}

export function paperQuestionRomove(id) {
  return request({
    url: '/manager/paperQuestion/'+id,
    method: 'delete',
  })
}

